package com.oracle.oa.entity;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;


@Entity                        
@Table(name="departinfo_info")
public class Departinfo  implements java.io.Serializable {

	 @GenericGenerator(name = "generator", strategy = "increment")
	 @Id
	 @GeneratedValue(generator = "generator")
	 @Column(name = "departid", unique = true, nullable = false)
     private int departid;
	 @ManyToOne
 	 @JoinColumn(name = "userstate_id")
     private Userinfo userinfo;
	 @Column(name = "departname", length = 64)
     private String departname;
	 @Column(name = "connecttelno", length = 64)
     private String connecttelno;
	 @Column(name = "connectmobiletelno", length = 64)
     private String connectmobiletelno;
	 @Column(name = "faxes", length = 64)
     private String faxes;
	 @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "category")
     private Set schedules = new HashSet(0);


    // Constructors

    /** default constructor */
    public Departinfo() {
    }

	/** minimal constructor */
    public Departinfo(Userinfo userinfo, String departname) {
        this.userinfo = userinfo;
        this.departname = departname;
    }
    
    /** full constructor */
    public Departinfo(Userinfo userinfo, String departname, String connecttelno, String connectmobiletelno, String faxes, Set schedules) {
        this.userinfo = userinfo;
        this.departname = departname;
        this.connecttelno = connecttelno;
        this.connectmobiletelno = connectmobiletelno;
        this.faxes = faxes;
        this.schedules = schedules;
    }

   
    // Property accessors

    public Userinfo getUserinfo() {
        return this.userinfo;
    }
    
    public int getDepartid() {
		return departid;
	}

	public void setDepartid(int departid) {
		this.departid = departid;
	}

	public void setUserinfo(Userinfo userinfo) {
        this.userinfo = userinfo;
    }

    public String getDepartname() {
        return this.departname;
    }
    
    public void setDepartname(String departname) {
        this.departname = departname;
    }

    public String getConnecttelno() {
        return this.connecttelno;
    }
    
    public void setConnecttelno(String connecttelno) {
        this.connecttelno = connecttelno;
    }

    public String getConnectmobiletelno() {
        return this.connectmobiletelno;
    }
    
    public void setConnectmobiletelno(String connectmobiletelno) {
        this.connectmobiletelno = connectmobiletelno;
    }

    public String getFaxes() {
        return this.faxes;
    }
    
    public void setFaxes(String faxes) {
        this.faxes = faxes;
    }

    public Set getSchedules() {
        return this.schedules;
    }
    
    public void setSchedules(Set schedules) {
        this.schedules = schedules;
    }
   








}